<#include "/template/_openwin.html" /> <#assign title="修改角色"> <@buttons>

<a href="#" class="easyui-linkbutton"
	data-options="plain:true,iconCls:'icon-save'" onclick="save()">保存并关闭</a>
<a href="#" class="easyui-linkbutton"
	data-options="plain:true,iconCls:'icon-cancel'"
	onclick="javascript:window.close()">取消</a>
</@buttons> <@body>

<div>
	<form id="ff" method="post" action="${root!}/framerole/update">
		<input type="hidden" name="FrameRole.id" value="${FrameRole.id!}" />
		<table class="form-table">
			<tr>
				<td>角色类别:</td>
				<td><select id="roleType" style="width: 99%" class="easyui-validatebox"
					type="text" value="${FrameRole.roleTypeId!}"
					name="FrameRole.roleTypeId" data-options="valueField:'id',  
                    textField:'roleTypeName'"></select>
				</td>
			</tr>
			<tr>
				<td>角色名称:</td>
				<td><input style="width: 99%" class="easyui-validatebox"
					type="text" value="${FrameRole.roleName!}"
					name="FrameRole.roleName" data-options="required:true"></input>
				</td>
			</tr>
			<tr>
				<td>排序号:</td>
				<td><input style="width: 99%" class="easyui-validatebox"
					type="number" value="${FrameRole.order!}" name="FrameRole.order"
					data-options="required:false"></input>
				</td>
			</tr>
		</table>
	</form>
</div>
</@body>
<script type="text/javascript">
    $(function(){
    	$('#roleType').combobox({
            url:'${root!}/framerole/getRoleType',
            panelHeight:'auto'  
         });
        });

	function save(){
		$('#ff').form('submit',{
			dataType:"json",
			success:function(msg){
				alert(msg);
				window.returnValue="1";
				window.close();
			}
		});
	}

</script>